home *** CD-ROM | disk | FTP | other *** search
- stop();
- showScores = function()
- {
- var i = 10;
- while(i > 0)
- {
- var n = scoreboard_lv["name" + (page + i)];
- var s = scoreboard_lv["score" + (page + i)];
- var l_mc = this["line" + i + "_mc"];
- l_mc.rank_txt.text = page + i + ".";
- l_mc.name_txt.text = !n.length ? "..." : n.toUpperCase();
- l_mc.score_txt.text = !s.length ? "..." : s.addCommas();
- l_mc.rank_txt.textColor = l_mc.name_txt.textColor = l_mc.score_txt.textColor = !(game_so.data.playerName.length && n.toUpperCase() == game_so.data.playerName.toUpperCase()) ? 16777215 : 16777011;
- l_mc._visible = true;
- loading_mc._visible = false;
- i--;
- }
- };
- page = 0;
- maxScore = 100;
- scoreboard_lv = new LoadVars();
- if(score > 0 && game_so.data.playerName.length > 0)
- {
- scoreboard_lv.score = score;
- scoreboard_lv.name = game_so.data.playerName.toLowerCase();
- }
- scoreboard_lv.game = "pacman";
- scoreboard_lv.sendAndLoad("http://score.openwares.org/games_score_text.php",scoreboard_lv,"POST");
- scoreboard_lv.onLoad = function(success)
- {
- if(success)
- {
- if(Boolean(scoreboard_lv.success))
- {
- next_btn._visible = true;
- if(scoreboard_lv.maxScore.length > 0)
- {
- maxScore = Number(scoreboard_lv.maxScore);
- }
- showScores();
- }
- else
- {
- loading_mc.errorMsg = scoreboard_lv.errorMsg.toUpperCase();
- loading_mc.gotoAndStop(2);
- }
- }
- else
- {
- loading_mc.errorMsg = "COULD NOT ACCESS SCORES.";
- loading_mc.gotoAndStop(2);
- }
- };
- score = 0;
- next_btn._visible = last_btn._visible = false;
-